<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>AuthenticationExample.mxml</title>
<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
</head>

<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
<span class="MXMLComponent_Tag">&lt;s:Application</span><span class="MXMLDefault_Text"> xmlns:fx="</span><span class="MXMLString">http://ns.adobe.com/mxml/2009</span><span class="MXMLDefault_Text">"
               xmlns:mx="</span><span class="MXMLString">library://ns.adobe.com/flex/halo</span><span class="MXMLDefault_Text">"
               xmlns:s="</span><span class="MXMLString">library://ns.adobe.com/flex/spark</span><span class="MXMLDefault_Text">" viewSourceURL="</span><span class="MXMLString">srcview/index.html</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;fx:Script&gt;</span>
        <span class="ActionScriptOperator">&lt;</span><span class="ActionScriptOperator">!</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">CDATA</span><span class="ActionScriptBracket/Brace">[</span>
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">authenticate</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">AccessTokenService</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">authenticate</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">AccessTokenFaultEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">authenticate</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">AccessTokenResultEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">users</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">UserService</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">users</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">UsersFaultEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">users</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">UsersResultEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">utils</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">ObjectUtil</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">unitedmindset</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">utils</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">FormUtil</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">controls</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">Alert</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">NetflixResultEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">authenticate</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">AuthenticationService</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">authenticate</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">AuthenticationFaultEvent</span>;
            <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">com</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">netflix</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">webapis</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">authenticate</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">events</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">AuthenticationResultEvent</span>;
            
            <span class="ActionScriptReserved">protected</span> <span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">button1_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">MouseEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">a</span>:<span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">consumerKeyV</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">consumerSecretV</span><span class="ActionScriptBracket/Brace">]</span>;
                <span class="ActionScriptDefault_Text">FormUtil</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">formValidation</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">a</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">requestToken</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">requestToken</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">auth</span>:<span class="ActionScriptDefault_Text">AuthenticationService</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">AuthenticationService</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">auth</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">AuthenticationResultEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">RESULT</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">onAuthResult</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">auth</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">AuthenticationFaultEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">FAULT</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">onAuthFault</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">auth</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">requestToken</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">consumerKey</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">consumerSecret</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onAuthResult</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">AuthenticationResultEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">resultText</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">ObjectUtil</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">toString</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">requestAuthorizationButton</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enabled</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                <span class="ActionScriptDefault_Text">requestUserButton</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enabled</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                <span class="ActionScriptDefault_Text">requestAccessTokenButton</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">enabled</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onAuthFault</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">AuthenticationFaultEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">Alert</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptString">"Requesting Netflix OAuth Token Failed."</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text"></span><span class="ActionScriptString">"Authentication Fault"</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">}</span>

            <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">requestAuthorizationButton_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">MouseEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptBracket/Brace"></span>
                <span class="ActionScriptComment">//no result is returned from this request
</span>                <span class="ActionScriptDefault_Text">AuthenticationService</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">getAuthorization</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">}</span>

            <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">requestUserButton_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">MouseEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">userService</span>:<span class="ActionScriptDefault_Text">UserService</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">UserService</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">userService</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">UsersResultEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">GET_USER_RESULT_EVENT</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">onUserInfoResult</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">userService</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">UsersFaultEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">FAULT</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">onUserInfoFault</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">userService</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">getUserInfo</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onUserInfoResult</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">UsersResultEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">resultText</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">ObjectUtil</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">toString</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onUserInfoFault</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">UsersFaultEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">Alert</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptString">"User Information is ONLY available after a Netflix Application Authorization has occurred AND Access Token has been received."</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text"></span><span class="ActionScriptString">"User Info Request Fault"</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">}</span>


            <span class="ActionScriptReserved">protected</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">requestAccessTokenButton_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">MouseEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">access</span>:<span class="ActionScriptDefault_Text">AccessTokenService</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">AccessTokenService</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">access</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">AccessTokenResultEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">RESULT</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">onAccessTokenResult</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">access</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">addEventListener</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">AccessTokenFaultEvent</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">FAULT</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text">onAccessTokenFault</span><span class="ActionScriptBracket/Brace">)</span>;
                <span class="ActionScriptDefault_Text">access</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">getAccessToken</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onAccessTokenResult</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">AccessTokenResultEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">resultText</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">text</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">ObjectUtil</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">toString</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">onAccessTokenFault</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span>:<span class="ActionScriptDefault_Text">AccessTokenFaultEvent</span><span class="ActionScriptBracket/Brace">)</span>:<span class="ActionScriptReserved">void</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">Alert</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptString">"Need a Netflix token AND Netflix Application Authorization prior to receiving an access token."</span><span class="ActionScriptOperator">,</span><span class="ActionScriptDefault_Text"></span><span class="ActionScriptString">"Access Token Fault"</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">}</span>

        <span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace"></span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;/fx:Script&gt;</span>
    <span class="MXMLComment">&lt;!--</span><span class="MXMLComment"> validators </span><span class="MXMLComment">--&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;fx:Declarations&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:StringValidator</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">consumerKeyV</span><span class="MXMLDefault_Text">" source="</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">consumerKey</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">" property="</span><span class="MXMLString">text</span><span class="MXMLDefault_Text">" required="</span><span class="MXMLString">true</span><span class="MXMLDefault_Text">" minLength="</span><span class="MXMLString">24</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:StringValidator</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">consumerSecretV</span><span class="MXMLDefault_Text">" source="</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">consumerSecret</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">" property="</span><span class="MXMLString">text</span><span class="MXMLDefault_Text">" required="</span><span class="MXMLString">true</span><span class="MXMLDefault_Text">" minLength="</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;/fx:Declarations&gt;</span>
    <span class="MXMLComment">&lt;!--</span><span class="MXMLComment"> design </span><span class="MXMLComment">--&gt;</span>
    <span class="MXMLComponent_Tag">&lt;s:layout&gt;</span>
        <span class="MXMLComponent_Tag">&lt;s:HorizontalLayout</span><span class="MXMLDefault_Text"> paddingBottom="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">" paddingLeft="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">" paddingRight="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">" paddingTop="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">" gap="</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/s:layout&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:Form&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormHeading</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Request Token</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormItem</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Consumer Key</span><span class="MXMLDefault_Text">" toolTip="</span><span class="MXMLString">Get your consumer key from Netflix if you haven't already</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:TextInput</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">consumerKey</span><span class="MXMLDefault_Text">" text="</span><span class="MXMLString">pg32t5aaud5eus8386k6dw88</span><span class="MXMLDefault_Text">" name="</span><span class="MXMLString">Consumer Key</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:FormItem&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormItem</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Consumer Secret</span><span class="MXMLDefault_Text">" toolTip="</span><span class="MXMLString">Get your consumer secret from Netflix if you haven't already</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:TextInput</span><span class="MXMLDefault_Text"> id="</span><span class="MXMLString">consumerSecret</span><span class="MXMLDefault_Text">" text="</span><span class="MXMLString">tATMRRXWGq</span><span class="MXMLDefault_Text">" name="</span><span class="MXMLString">Consumer Secret</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:FormItem&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormItem&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Request Token</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">button1_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:FormItem&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormHeading</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Netflix App Authorization</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormItem&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Request Authorization</span><span class="MXMLDefault_Text">" enabled="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">" id="</span><span class="MXMLString">requestAuthorizationButton</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">requestAuthorizationButton_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:FormItem&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormHeading</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Access Token</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormItem&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Request Access Token</span><span class="MXMLDefault_Text">" enabled="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">" id="</span><span class="MXMLString">requestAccessTokenButton</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">requestAccessTokenButton_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:FormItem&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormHeading</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">User Info</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:FormItem&gt;</span>
            <span class="MXMLComponent_Tag">&lt;s:Button</span><span class="MXMLDefault_Text"> label="</span><span class="MXMLString">Request User Info</span><span class="MXMLDefault_Text">" enabled="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">" id="</span><span class="MXMLString">requestUserButton</span><span class="MXMLDefault_Text">" click="</span><span class="ActionScriptDefault_Text">requestUserButton_clickHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">event</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:FormItem&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/mx:Form&gt;</span>
    <span class="MXMLComponent_Tag">&lt;s:TextArea</span><span class="MXMLDefault_Text"> width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" height="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" id="</span><span class="MXMLString">resultText</span><span class="MXMLDefault_Text">" editable="</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
<span class="MXMLComponent_Tag">&lt;/s:Application&gt;</span></pre></body>
</html>
